package cn.edu.gench.learn.day4.war3;

/**
 * Created by Administrator on 2017/3/31.
 */
public class Ring {

    public static void main(String[] args) {

        AmHero amHero = new AmHero();
        JuggHero juggHero  =new JuggHero();
        System.out.println("战斗开始。。。");
        while ( amHero.blood > 0 && juggHero.blood > 0){

            amHero.fight(juggHero);
            if(juggHero.blood <= 0){
                break;
            }
            juggHero.fight(amHero);
            if(amHero.blood <= 0){
                break;
            }
            System.out.println("魔法冷却中");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

        System.out.println(amHero);
        System.out.println(juggHero);
        System.out.println("结束。。。");




    }
}
